import { Controller, Get, Inject, Param } from '@nestjs/common';
import { StudentService } from 'src/core/service/student.service';

@Controller('students')
export class StudentController{
    @Inject()
    private studentService:StudentService
// constructor(private readonly z:StudentService){}//service注入到controller
@Get()
findAll(){
    return this.findAll();
}
@Get(':id')
findOne(@Param('id') id:string){
    return this.studentService.findOne(+id);
}
}